<template>
  <div>
      <input type="text" v-model="name"><button @click="search">搜索</button>
      <table>
           <tr v-for="data in datas">
               <td>{{data.name}}</td>
               <td>{{data.sale}}</td>
               <td>{{data.price}}</td>
               <td>{{data.author}}</td>
           </tr>
      </table>
  </div>
</template>

<script>
export default {
    name:'book_searc',
    data(){
        return{
            datas:[],
            name:''
        }
    },
    methods:{
        search(){
            this.axios.get('yt5/',{params:{'name':this.name}}).then(res=>{
                this.datas=res.data
            })
        }
    }

}
</script>

<style>

</style>